package com.zxzw.scanningin

import android.content.Context
import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.AppCompatTextView
import com.lxj.xpopup.core.CenterPopupView

class PayResultPop(context: Context,private val type:Int):CenterPopupView(context) {
    override fun getImplLayoutId(): Int {
        return R.layout.result_dialog
    }

    override fun onCreate() {
        super.onCreate()
        var success2 = findViewById<AppCompatImageView>(R.id.result_img)
        var success = findViewById<AppCompatTextView>(R.id.result)
        when(type){
            1 ->{
                success2.setImageResource(R.mipmap.success)
                success.text = "签到成功"
            }
            2->{
                success2.setImageResource(R.mipmap.error)
                success.text = "签到失败"
            }
            3->{
                success2.setImageResource(R.mipmap.tip)
                success.text = "二维码过期"
            }
        }

    }
}